package day23;

import java.util.Arrays;

public class Main {
    public static void func(int[] arr,int n) {
        Arrays.sort(arr);
        int a = n/2;
        int aim = arr[a];
        int count = 0;
        for (int x:arr) {
            if(x == aim) {
                count++;
            }
        }
        if(count >= n/2) {
            System.out.println(aim);
        } else {
            System.out.println(-1);
        }
    }

    public static void main(String[] args) {

    }
}
